package ui.fragment;



import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import ui.UiInterface;

//整个项目的基本fragment
//和基本activity差不多，所以不用写两遍代码，
public abstract class BaseFragment extends Fragment implements UiInterface{

    private View myView;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        myView = inflater.inflate(getLayout(),null);
        initView();
        initListener();
        initData();
        return myView;
    }
    //找到ID控件
    public View findViewById( int resId ){
        return myView.findViewById(resId);
    }
}
